- The XBRL Standard
- XBRL Specifications
- Registries
- Functions Registry 1.0
- Functions Registry
- xfi:context-entity
- 80131:
Function test xfi:context-entity
Documentation
Tests of xfi:context-entity($item as element(xbrli:context)) as element(xbrli:entity)
Owners
Name
|
Affiliation
|
Email
|
Start
|
End
|
Herm Fischer |
UBMatrix / Mark V Systems
|
fischer@markv.com |
10-03-2008 at 00:00:00 |
|
References
http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670685
Test Case Variations
V-01
Returns correct entity element for context
Documentation
Inputs
- schema: entity-tests.xsd
- instance: entity-instance.xml
(DTS Discovery starting point)
(ID=V01)
-
Function Call:
xfi:context-entity( xfi:context( //concept:c1[1] ) )
(against file V01)
Outputs
-
Result test:
$result instance of element(xbrli:entity) and
count( $result ) eq 1 and
$result is /xbrli:xbrl/xbrli:context[@id eq 'context-1']/xbrli:entity
V-02
Entity for context 2
Documentation
Inputs
- schema: entity-tests.xsd
- instance: entity-instance.xml
(DTS Discovery starting point)
(ID=V02)
-
Function Call:
xfi:context-entity( /xbrli:xbrl/xbrli:context[2] )
(against file V02)
Outputs
-
Result test:
$result instance of element(xbrli:entity) and
count( $result ) eq 1 and
$result is /xbrli:xbrl/xbrli:context[@id eq 'context-2']/xbrli:entity
V-03
Wrong node to function
Documentation
XPath-defined error for node type incorrect.
Inputs
- schema: entity-tests.xsd
- instance: entity-instance.xml
(DTS Discovery starting point)
(ID=V03)
-
Function Call:
xfi:context-entity( /xbrli:xbrl/concept:c1[2] )
(against file V03)
Outputs
-
Error code: xqt-err:XPTY0004
V-04
A sequence of contexts as argument
Documentation
XPath-defined error for node type incorrect arity of argument.
Inputs
- schema: entity-tests.xsd
- instance: entity-instance.xml
(DTS Discovery starting point)
(ID=V04)
-
Function Call:
xfi:context-entity( /xbrli:xbrl/xbrli:context[true()] )
(against file V04)
Outputs
-
Error code: xqt-err:XPTY0004
Revisions
Name
|
On
|
Details
|
Herm Fischer |
10-03-2008 at 00:00:00 |
Created the test case.
|